package com.ruoyi.biz.service.impl;

import java.util.List;

import com.ruoyi.biz.domain.EquipmentWarnUser;
import com.ruoyi.biz.mapper.EquipmentWarnUserMapper;
import com.ruoyi.biz.service.IEquipmentWarnUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2020-12-18
 */
@Service
public class EquipmentWarnUserServiceImpl implements IEquipmentWarnUserService
{
    @Resource
    private EquipmentWarnUserMapper equipmentWarnUserMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param userId 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public EquipmentWarnUser selectEquipmentWarnUserById(Integer userId, Integer equipmentId)
    {
        EquipmentWarnUser equipmentWarnUser = new EquipmentWarnUser();
        equipmentWarnUser.setUserId(userId);
        equipmentWarnUser.setEquipmentId(equipmentId);
        return equipmentWarnUserMapper.selectEquipmentWarnUserById(equipmentWarnUser);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param equipmentWarnUser 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<EquipmentWarnUser> selectEquipmentWarnUserList(EquipmentWarnUser equipmentWarnUser)
    {
        return equipmentWarnUserMapper.selectEquipmentWarnUserList(equipmentWarnUser);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param equipmentWarnUser 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertEquipmentWarnUser(EquipmentWarnUser equipmentWarnUser)
    {
        return equipmentWarnUserMapper.insertEquipmentWarnUser(equipmentWarnUser);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param equipmentWarnUser 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateEquipmentWarnUser(EquipmentWarnUser equipmentWarnUser)
    {
        return equipmentWarnUserMapper.updateEquipmentWarnUser(equipmentWarnUser);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param userIds 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteEquipmentWarnUserByIds(Integer[] userIds)
    {
        return equipmentWarnUserMapper.deleteEquipmentWarnUserByIds(userIds);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param userId 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteEquipmentWarnUserById(Integer userId,Integer equipmentId)
    {
        EquipmentWarnUser equipmentWarnUser = new EquipmentWarnUser();
        equipmentWarnUser.setEquipmentId(equipmentId);
        equipmentWarnUser.setUserId(userId);
        return equipmentWarnUserMapper.deleteEquipmentWarnUserById(equipmentWarnUser);
    }
}
